package com.cn.mmd.service;

import com.cn.mmd.mapper.ShiroUserRoleMapper;
import com.cn.mmd.model.ShiroUserRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2016/8/9 0009.
 */
@Service("shiroUserRoleService")
public class ShiroUserRoleServiceImpl implements ShiroUserRoleService {

    @Autowired
    private ShiroUserRoleMapper shiroUserRoleMapper;

    @Override
    public List<ShiroUserRole> selectByUserId(String userId) {
        return shiroUserRoleMapper.selectByUserId(userId);
    }

    @Override
    public int insertSelective(ShiroUserRole record) {
        return shiroUserRoleMapper.insertSelective(record);
    }

    @Override
    public ShiroUserRole selectByAll(ShiroUserRole shiroUserRole) {
        return shiroUserRoleMapper.selectByAll(shiroUserRole);
    }

    @Override
    public int updateByPrimaryKeySelective(ShiroUserRole record) {
        return shiroUserRoleMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return shiroUserRoleMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int deleteByUserId(String userId) {
        return shiroUserRoleMapper.deleteByUserId(userId);
    }
}
